//
//  UIViewController+Alert.h
//  Fangxiaov
//
//  Created by safiri on 2017/5/5.
//  Copyright © 2017年 com.f. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIViewController (Alert)

/// title message Action:yesOrCancel
- (void)alertTitle:(NSString *)title Message:(NSString *)message Action:(void(^)(BOOL yesOrCancel))actionBlock;
/// title message ActionTitles Action:actionTag
- (void)alertTitle:(NSString *)title Message:(NSString *)message AlertActionTitle:(NSArray <NSString *> *)titles  Action:(void(^)(NSInteger actionTag))actionBlock;
/// title message ActionTitles ActionStyles Action:actionTag

/**
 title message ActionTitles ActionStyles Action:actionTag
 
 UIAlertActionStyleDefault = 0, -> @0
 UIAlertActionStyleCancel,      -> @1
 UIAlertActionStyleDestructive  -> @2
 */
- (void)alertTitle:(NSString *)title Message:(NSString *)message AlertActionTitle:(NSArray <NSString *> *)titles AlertActionStyles:(NSArray <NSNumber *>*)styles  Action:(void(^)(NSInteger actionTag))actionBlock;
/// title message Action:Confirm
- (void)alertConfirmTitle:(NSString *)title Message:(NSString *)message ConfirmAction:(void(^)(void))confirmBlock;
/// title message YesDestructiveActionTitle NoCancelActionTitle Action:yesOrCancel
- (void)alertTitle:(NSString *)title Message:(NSString *)message YesDestructiveActionTitle:(NSString *)yesDesTitle NoCancelActionTitle:(NSString *)noCancelTitle Action:(void(^)(BOOL yesOrCancel))actionBlock;
/// title message YesDefaultActionTitle NoDestructiveCancelActionTitle Action:yesOrCancel
- (void)alertTitle:(NSString *)title Message:(NSString *)message YesDefaultActionTitle:(NSString *)yesDesTitle NoDestructiveCancelActionTitle:(NSString *)noCancelTitle Action:(void(^)(BOOL yesOrCancel))actionBlock;
/// title message Action:yesOrCancel,result  Config:configTextField
- (void)alertTitle:(NSString *)title Message:(NSString *)message Action:(void(^)(BOOL yesOrCancel ,NSString *result))actionBlock Config:(void (^)(UITextField *textField))configTextField;



///UIAlertActionStyleDefault = 0,UIAlertActionStyleCancel,UIAlertActionStyleDestructive
- (void)alertActionSheetTitle:(NSString *)title Message:(NSString *)message selectSourceTitleArray:(NSArray<NSString *> *)dataArray actionStyles:(NSArray <NSNumber *>*)styles Selected:(void(^)(NSString *selectStr, NSInteger selectTag))selectionBlock;

/// alert ask for call phoneNo
- (void)alertAskForCallWithPhoneNumber:(NSString *)phoneNumber;
- (void)alertAskForCallWithPhoneNumber:(NSString *)phoneNumber hintTitle:(NSString *)hintTitle message:(NSString *)message;
/// 输入手机号 发送验证码
- (void)alertSendValidCodeTitle:(NSString *)title Message:(NSString *)message AlertActionTitle:(NSArray <NSString *> *)titles AlertActionStyles:(NSArray <NSNumber *>*)styles  Action:(void(^)(NSInteger actionTag))actionBlock phoneTFConfig:(void (^)(UITextField *textField))phoneTFConfig validcodeTFConfig:(void (^)(UITextField *textField))validcodeTFConfig;
@end
